﻿@using EC_ASS.Models;
<ul class="nav nav-pills nav-top">
    @if (Session["CUST"] == null)
    {
@*<li><fb:login-button autologoutlink="true" perms="read_friendlists, create_event, email, publish_stream"></fb:login-button></li>*@
        <li>
            <a href="#loginModal" data-toggle="modal">| Đăng nhập |</a>
        </li>
        <li>
            <a href="/Account/Register">| Đăng kí |</a>
        </li>
    }
    else
    {
        Customer cus = (Customer)Session["CUST"];
        <li class="dropdown">
            <a id="drop1" href="#" class="dropdown-toggle" data-toggle="dropdown">Chào, @cus.Name <b class="caret"></b></a>
            <ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
                <li role="presentation">
                    <a href="/Account/Index">Xem thông tin</a>
                </li>
                <li role="presentation"><a role="menuitem" tabindex="-1" href="/Account/Logout">Thoát</a></li>
            </ul>
        </li>
    }
    <li class="dropdown" id="shoppingCart">
    </li>
    <li>
        <form class="form-search" id="searchForm" action="/Home/Search" method="get">
            <div class="control-group">
                <input type="text" name="key" id="key" placeholder="Tìm kiếm ...">
                <select name="price" class="span2">
                    <option value="0">Giá</option>
                    <option value="1">< 100.000 </option>
                    <option value="2">101.000 - 300.000</option>
                    <option value="3">> 300.000 </option>
                </select>
                <button class="btn" type="submit"><i class="icon-search"></i></button>
            </div>
        </form>
    </li>
</ul>
<script>
    $(function () {
        $('#shoppingCart').load('@Url.Action("_ShoppingCart", "Product")');
    });
</script>
